#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>
#include <QLineEdit>
#include <QPushButton>
#include <QInputDialog>
#include "csqlite.h"


QT_BEGIN_NAMESPACE
namespace Ui {
class Widget;
}
QT_END_NAMESPACE

class Widget : public QWidget
{
    Q_OBJECT

public:
    Widget(QWidget *parent = nullptr);
    ~Widget();


private:
    Ui::Widget *ui;
    QStringList m_titleList{"id","name","alias","price","unit"};
    QList<QLineEdit*>m_fieldList;
    QPushButton *m_btn_clean,*m_btn_ok,*m_btn_search,*m_btn_update;
    CSqlite *m_sqlite;
    //判断是否修改状态
    bool isUpdated = false;

    void init();

};
#endif // WIDGET_H
